home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 July / 07_02.iso / software / xq-xsetup / files / setup.exe / {app} / plugins / XQ FileShellEx.xpl < prev    next >
Text File  |  2001-05-07  |  2KB  |  79 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="1"
  3. "COUNT"="4"
  4. "UIPATH"="Appearance\Files&Folders\ANY file"
  5. "NAME"="Any File User Defined Context Menu"
  6. "VERSION"="1.10"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="1) Name:"
  9. "TEXT 2"="1) Command:"
  10. "TEXT 3"="2) Name:"
  11. "TEXT 4"="2) Command:"
  12. "DESCRIPTION 1"="This plug-in can be used to add two commands to the context menu that appears if you right-click ANY file in the Explorer."
  13. "DESCRIPTION 2"="First, enter a name for the command (e.g. "View with Notepad") in the field "Name". Then enter the command that should be executed if this item is selected in the field "Command". The name of the current file can be inserted through "%1" (e.g. notepad.exe "%1")."
  14. "DESCRIPTION 3"="To remove the command again, clear both the "Name" and the "Command" field and press "Apply"."
  15. "DESCRIPTION 4"="An example:"
  16. "DESCRIPTION 5"="1) Name:        View with Notepad"
  17. "DESCRIPTION 6"="1) Command:  notepad.exe "%1""
  18. "AUTHOR"="Xteq Systems"
  19. "CONTACTURL"="http://www.xteq.com"
  20. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  21. "COMMENT 1"=" "
  22. "COMMENT 2"="Thanks to Jimmy [mailto:j.helena@attglobal.net] for the idea."
  23.  
  24.  
  25. sPath1="HKCR\*\Shell\XQXSETCMD1\"
  26. sPath2="HKCR\*\Shell\XQXSETCMD2\"
  27. sCMD="Command\@"
  28. Sub Plugin_Initialize
  29.  s=RegReadValue(sPath1 & sCMD)
  30.  if len(s)>0 then
  31.   s=RegReadValue(sPath1 & "@")
  32.   SetUIElement 1,s
  33.  
  34.   s=RegReadValue(sPath1 & sCMD)
  35.   SetUIElement 2,s
  36.  end if
  37.  
  38.  s=RegReadValue(sPath2 & sCMD)
  39.  if len(s)>0 then
  40.   s=RegReadValue(sPath2 & "@")
  41.   SetUIElement 3,s
  42.  
  43.   s=RegReadValue(sPath2 & sCMD)
  44.   SetUIElement 4,s
  45.  end if
  46. End Sub
  47.  
  48. Sub Plugin_CheckData(ElementIndex)
  49. End Sub
  50.  
  51. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  52.  s1=GetUIElement(1)
  53.  s2=GetUIElement(2)
  54.  if len(s1)>0 or len(s2)>0 then
  55.   Call RegWriteValue(sPath1 & sCMD,s2,1)
  56.   Call RegWriteValue(sPath1 & "@",s1,1)
  57.  else
  58.   if IsEmpty(RegReadValue(sPath1 & sCMD))=false then
  59.    Call RegDeletePath(sPath1 & "Command")
  60.    Call RegDeletePath(sPath1)
  61.   end if
  62.  end if
  63.  
  64.  s1=GetUIElement(3)
  65.  s2=GetUIElement(4)
  66.  if len(s1)>0 or len(s2)>0 then
  67.   Call RegWriteValue(sPath2 & sCMD,s2,1)
  68.   Call RegWriteValue(sPath2 & "@",s1,1)
  69.  else
  70.   if IsEmpty(RegReadValue(sPath2 & sCMD))=false then
  71.    Call RegDeletePath(sPath2 & "Command")
  72.    Call RegDeletePath(sPath2)
  73.   end if
  74.  end if
  75. End Sub
  76.  
  77. Sub Plugin_Terminate 
  78. End Sub
  79.